package bean;

import java.io.Serializable;
import java.util.Objects;

/**
 * @Auther leiHua
 * @Date 2022/5/13 20:44
 * 存储运动员的报名信息类
 */
public class EntryForm implements Serializable {
    private static final long serialVersionUID = 1L;
    //运动员信息类
    private Athlete athlete;
    //比赛项目信息类
    private Competition competition;

    //这条报名信息的id
    private String id;

    private String status;

    @Override
    public String toString() {
        return "EntryForm{" +
                "athlete=" + athlete +
                ", competition=" + competition +
                ", id='" + id + '\'' +
                ", status='" + status + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        EntryForm entryForm = (EntryForm) o;
        return Objects.equals(athlete, entryForm.athlete) && Objects.equals(competition, entryForm.competition) && Objects.equals(id, entryForm.id) && Objects.equals(status, entryForm.status);
    }

    @Override
    public int hashCode() {
        return Objects.hash(athlete, competition, id, status);
    }

    public Athlete getAthlete() {
        return athlete;
    }

    public void setAthlete(Athlete athlete) {
        this.athlete = athlete;
    }

    public Competition getCompetition() {
        return competition;
    }

    public void setCompetition(Competition competition) {
        this.competition = competition;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public EntryForm() {
    }

    public EntryForm(Athlete athlete, Competition competition, String id,String status) {
        this.athlete = athlete;
        this.competition = competition;
        this.id = id;
        this.status=status;
    }
}
